﻿<Window x:Class="KharaSoft.ProjectManager.Windows.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Windows="clr-namespace:KharaSoft.ProjectManager.Windows" Title="MainWindow" Height="350" Width="525">
    <Window.DataContext>
        <Windows:ProjectListViewModel/>
    </Window.DataContext>
    <Grid>
        
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <ListBox 
            x:Name="ProjectList" 
            SelectedItem="{Binding SelectedProject}"
            ItemsSource="{Binding AvailableProjects}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}"></TextBlock>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Button Command="{Binding AddProjectCommand}" Grid.Row="1" VerticalAlignment="Bottom">
            Add New Project
        </Button>
        <Windows:TaskListUserControl Grid.Column="1"/>
    </Grid>
</Window>
